js loop array backward

122

js loop array backward -

let arr = [1, 2, 3];
arr.slice().reverse().forEach(x => console.log(x))

Comments

Submit
0 Comments